<?php
/**
 * @author Tuong Tran <tuong.tran@outlook.com>
 */
?>


<div class="span6">
    <h3 class="heading">Input form</h3>
    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'gallery-item-external-form',
        'htmlOptions' => array(
            'class' => 'form-horizontal'
        )
            ))
    ?>
    <?php echo $form->errorSummary($model) ?>
    <?php if ($model->where == Resource::WHERE_EXTERNAL) : ?>
        <div class="control-group external">
            <label class="control-label">Select file type<span class="required">*</span></label>
            <div class="controls">
                <?php echo $form->dropDownList($model, 'resource_type', Resource::getTypes()) ?>
            </div>
        </div>
    <?php endif; ?>
    <div class="control-group external">
        <label class="control-label">Resource Name <span class="required">*</span></label>
        <div class="controls">
            <?php echo $form->textField($model, 'resource_name') ?>
            <p class="help-block">Enter full name</p>
        </div>
    </div>
    <div class="control-group external">
        <label class="control-label">Description</label>
        <div class="controls">
            <?php echo $form->textArea($model, 'resource_description', array('rows' => 5)) ?>
            <p class="help-block">Enter description here</p>
        </div>
    </div>
    <div class="control-group external">
        <label class="control-label"></label>
        <div class="controls">
            <input type="submit" value="Submit" class="btn btn-primary" id="submit-form" />
        </div>
    </div>

    <?php $this->endWidget() ?>
</div>
<div class="span6">
    <h3 class="heading">View</h3>
    <?php $this->renderPartial('_view', array('model' => $model)) ?>
</div>

